package com.rr.mymoney.bo;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.rr.mymoney.model.Account;
import com.rr.mymoney.model.Transaction;
import com.rr.mymoney.model.enums.TransactionType;
import com.rr.mymoney.upload.ImportData;

@Transactional
public interface TransactionBo {
    @Transactional
    public void saveOrUpdate(Transaction transaction);

    @Transactional(readOnly = true)
    public Transaction get(Long id);

    @Transactional
    public void delete(Transaction transaction);

    @Transactional(readOnly = true)
    public List<Transaction> getFiltered(Long userId, int month, int year, TransactionType transactionType, Long categoryId,
	    Long accountId, String currencyId);

    @Transactional
    public void importTransactionData(ImportData importData, Account account);
}
